<template>
	<div class='container'>
		<div class='top-title'>
			<p>资金明细</p>
			<div>
				<span>可用余额：{{userMoney}}元</span>
				 <el-button type='primary' size='small' @click='location'>充值</el-button>
			</div>
		</div>
		<div class='middle-input'>
			<span>日期</span>
			 <el-date-picker
			  v-model="time"
			  type="datetimerange"
			  range-separator="至"
			  start-placeholder="开始日期"
			  end-placeholder="结束日期">
			</el-date-picker>
			<el-button type='primary' size='medium' v-on:click='search'>搜索</el-button>
		</div>
		<div class='bottom-table'>
			<el-table
			:data="dataList"
      height='600'
			style="width: 100%">
			<el-table-column
			  type="index"
			  label='序号'
				width='90'>
         <template slot-scope='scope'>
              {{scope.$index + (form.pageIndex - 1) * form.pageSize + 1}}
         </template>
			</el-table-column>
			<el-table-column
			  prop="created_time"
			  label="日期">
			</el-table-column>
			<el-table-column
			  prop="type"
			  label="收/支">
			</el-table-column>
			<el-table-column
			  prop="remake"
			  label="内容">
			</el-table-column>
			<el-table-column
			prop="money"
			label="金额">
         <template slot-scope="scope">
                <span >{{scope.row.money}}</span>
         </template>
			</el-table-column>
			<el-table-column
			prop="store_money"
			label="账户余额">
			</el-table-column>
		  </el-table>
		</div>
     <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="form.pageIndex"
      :page-size="form.pageSize"
      layout="total, prev, pager, next, jumper"
      :total="count">
    </el-pagination>
  </div>
	</div>
</template>
<script src='./Detail.js'>

</script>
<style lang='scss' scoped>
   @import './Detail.scss'
</style>
